namespace Microsoft.Services.TestTools.UITesting.Html {
    using System;

    /// <summary>
    /// Use the BaseUriAttribute to specify an alternative base uri to be used by the <see cref="Page"/> launcher.
    /// </summary>
    /// <example>
    /// The following example will pass 'Shop' to the exported <see cref="IWebUITestConfiguration"/> in the test project.
    /// <code>
    /// [BaseUriAttribute("Shop")]
    /// public class Shop : Page {
    /// //impl omitted
    /// }
    /// </code>
    /// </example>
    public class BaseUriAttribute : Attribute {

        /// <summary>
        /// Initializes a new instance of the <see cref="BaseUriAttribute"/> class.
        /// </summary>
        /// <param name="name">The name of the Uri to use</param>
        public BaseUriAttribute(string name) {
            BaseUriName = name;
        }

        /// <summary>
        /// Gets the name of the base Uri.
        /// </summary>
        /// <value>
        /// The name of the base Uri.
        /// </value>
        public string BaseUriName { get; private set; }
    }
} 